{extend name='main'}

{block name="button"}
<!--{if auth("add")}-->
<button data-open='{:url("pageEdit")}' data-title="添加服务" class='layui-btn layui-btn-sm layui-btn-primary'>添加服务</button>
<!--{/if}-->
{/block}

{block name="content"}
<div class="think-box-shadow">
    <div class="layui-tab-content">
        {include file='free_service/search'}
        <table id="BaseData" data-url="{:sysuri()}" data-target-search="form.form-search"></table>
    </div>
    <table class="layui-table margin-top-10" lay-skin="line">
        {notempty name='list'}
        <thead>
        <tr>
            <th class='list-table-check-td think-checkbox'>
                <label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
            </th>
            <th class='list-table-sort-td'>
                <button class="layui-btn layui-btn-xs" data-reload type="button">刷 新</button>
            </th>
            <th class='text-center'></th>
            <th colspan="6"></th>
        </tr>
        <tr>
            <th class='list-table-check-td think-checkbox'>
                <label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
            </th>
            <th width="" class='text-center nowrap'>排序</th>
            <th width="" class='text-center nowrap'>名称</th>
            <th width="" class='text-center nowrap'>图标</th>
            <th width="" class='text-center nowrap'>图片</th>
            <th width="" class='text-center nowrap'>联系电话</th>
            <th width="" class='text-center nowrap'>地址</th>
            <th width="" class='text-center nowrap'>状态</th>
            <th width="" class='text-center nowrap'>操作</th>
        </tr>
        </thead>
        {/notempty}
        <tbody>
        {foreach $list as $key=>$vo}
        <tr>
            <td class='list-table-check-td think-checkbox'>
                <label><input class="list-check-box" type='checkbox' value='{$vo.id}'></label>
            </td>
            <td class='list-table-sort-td'>
                <label><input data-action-blur="{:sysuri('sort')}" data-value="id#{$vo.id};sort#{value}" data-loading="false" value="{$vo.sort}" class="list-sort-input"></label>
            </td>
            <td class="text-center nowrap">{$vo.name|default=""}</td>
            <td class="text-center nowrap">
                <img width="120" height="100" src='{$vo.icon|default=""}' alt=""/>
            </td>
            <td class="text-center nowrap">
                <img width="120" height="100" src='{$vo.image|default=""}' alt=""/>
            </td>
            <td class="text-center nowrap">{$vo.phone|default=""}</td>
            <td class="text-center nowrap">{$vo.address|default=""}</td>
            <td class="text-center nowrap">
                {eq name='vo.is_deleted' value='0'}<span class="layui-badge layui-bg-green">正常</span>{else}<span class="layui-badge">已删除</span>{/eq}
            </td>
            <td class="text-center nowrap">

                <!--{if auth('pageEdit')}-->
                <a class="layui-btn layui-btn-sm" data-open="{:url('pageEdit')}?id={$vo.id}" data-title="编辑" data-dbclick data-value="id#{$vo.id}" data-csrf="{:systoken('pageEdit')}">编辑</a>
                <!--{elseif auth('del') and $vo.is_deleted eq 0}-->
                <a class="layui-btn layui-btn-sm" data-action="{:url('del')}" data-value="id#{$vo.id}" data-csrf="{:systoken('del')}">删除</a>
                <!--{/if}-->

                <!--{if auth("remove")}-->
                <a class="layui-btn layui-btn-sm layui-btn-danger" data-action="{:url('remove')}" data-value="id#{$vo.id}" data-csrf="{:systoken('remove')}" data-confirm="确定要删除该项吗？">删 除</a>
                <!--{/if}-->

            </td>
        </tr>
        {/foreach}
        </tbody>
    </table>

    {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
</div>

{/block}